<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .d1 {
            width: 100px;
            height: 150px;
            background-color: red;
            float: left;
            font-size: 30px;
            line-height: 150px;
            text-align: center;
        }

        .d2 {
            overflow: hidden;
            height: 300px;
            background-color: rosybrown;
            line-height: 300px;
            text-align: center;
            font-size: 50px;
        }
    </style>
</head>

<body>
    <div class="d1"> LEFT </div>
    <div class="d2"> RIGHT </div>




    <style>
        .box {
            border: 1px solid black;
        }

        .box .left {
            background-color: red;
            float: left;
            width: 200px;
        }

        .box .right {
            background-color: blue;
            width: auto;
            margin-left: 200px;
        }
    </style>
    <h1>两栏布局</h1>
    <div class="box">
        <div class="left">1-left</div>
        <div class="right">1-right</div>
    </div>


    <style>
        .box2 {
            position: relative;
        }

        .box2 .left {
            background-color: blueviolet;
            width: 200px;
            position: absolute;
            left: 0;
        }

        .box2 .center {
            background-color: red;
            margin: 0 300px 0 200px;
        }

        .box2 .right {
            background-color: burlywood;
            width: 300px;
            position: absolute;
            right: 0;
            top: 0;
        }
    </style>
    <h1>三栏布局</h1>
    <div class="box2">
        <div class="left">left</div>
        <div class="center">center</div>
        <div class="right">right</div>
    </div>



    <style>
        header,
        footer {
            height: 100px;
            width: 100%;
            background-color: antiquewhite;
        }

        .container {
            height: 200px;
            padding-left: 200px;
            padding-right: 300px;
        }

        .container>div {
            float: left;
            position: relative;
            height: 100%;
        }

        .container .left {
            width: 200px;
            height: 200px;
            background-color: burlywood;
            margin-left: -100%;
            left: -200px;
        }

        .container .right {
            width: 300px;
            height: 200px;
            background-color: burlywood;
            margin-left: -300px;
            right: -300px;
        }

        .container .middle {
            width: 100%;
            height: 200px;
            background-color: #b0f9c2;
        }
    </style>
    <h1>圣杯布局</h1>
    <header>header</header>
    <div class="container">
        <div class="middle">midlle</div>
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
    <footer>footer</footer>



    <style>
        .main>div {
            float: left;
            position: relative;
            height: 300px;
        }

        .main .middle {
            width: 100%;
            background-color: lightgreen
        }

        .main .left {
            width: 200px;
            margin-left: -100%;
            background-color: red
        }

        .main .right {
            width: 200px;
            margin-left: -200px;
            background-color: orange
        }

        .main .middle-inner {
            margin: 0 200px;
            background-color: burlywood;
            height: 300px;
        }
    </style>
    <h1>双飞翼布局</h1>
    <div class="main">
        <div class="middle">
            <div class="middle-inner">中间</div>
        </div>
        <div class="left">左边</div>
        <div class="right">右边</div>
    </div>



</body>

</html>